package com.bst.bsj.biz.impl;

import com.bst.bsj.biz.SmsApi;
import com.homewaimai.common.lang.StringUtil;
/**
 * 
 * @author 
 *
 */
public abstract class AbsSmsApiImpl implements SmsApi {

    protected static String SERVER_ADDRESS;
    protected static String SERVER_PORT;


    protected StringBuffer getStringBuffer() {
        StringBuffer sb = new StringBuffer("");
        if(StringUtil.isBlank(SERVER_PORT)){
        	if(SERVER_ADDRESS.endsWith("/")){
        		 sb.append(SERVER_ADDRESS.substring(0, SERVER_ADDRESS.length()-1));
        		 return sb;
        	}else{
        		sb.append(SERVER_ADDRESS);
       		 	return sb;
        	}
        }else{
        	if(SERVER_ADDRESS.endsWith("/")){
        		sb.append(SERVER_ADDRESS.substring(0, SERVER_ADDRESS.length()-1)).append(":").append(SERVER_PORT);
        		return sb;
        	}else{
        		sb.append(SERVER_ADDRESS).append(":").append(SERVER_PORT);
                return sb;
        	}
        }
        
    }

}
